<template>
<div class="dialog-container" v-if="visable">
  <div class="dialog-content">
    <div class="closeBtn">
      <img style="height: 100%;width: auto;" @click="closelog()" src="../../../assets/images/取消@2x.png" />
    </div>
    <div class="body">
      <div class="dialogtitle">
        <div class="iconAlert">
          <img :src="soucedata.iconAlert">
        </div>
        <div class="titleAlert">{{ soucedata.titleBig }}</div>
      </div>
      <div class="dialog-body-bottom">
        <div class="text">① 根据提示安装任务助手 </div>
        <div class="text">② 完成简单任务 </div>
        <div class="link-btn" @click="goToLink">
          <div class="enterIcon">
            <img src="../../../assets/images/金币副本备份@2x.png" alt="">
          </div>
          <div class="enterText">立即前往</div>
        </div>
      </div>
    </div>
  </div>
</div>
</template>

<script>
export default {
  components: {},
  props: {
    visable: {
      type: Boolean,
      default: false
    },
    soucedata: {
      type: Object,
      default: () => {}
    }
  },
  data() {
    return {};
  },

  methods: {
    goToLink() {
      const {
        link
      } = this.soucedata
      window.open(link, '_blank')
    },
    closelog() {
      this.$emit('updataValue')
    }
  },

};
</script>

<style lang="scss" scoped>
.dialog-container {
  height: 100%;
  width: 100%;
  z-index: 100000;
  position: fixed;
  top: 0px;
  background-color: rgba(0, 0, 0, 0.5);

  .dialog-content {
    overflow: hidden;
    width: 80%;
    height: 70%;
    z-index: 100001;
    left: 10%;
    top: 20%;
    position: fixed;
  }
}

.body {
  position: relative;

  .dialogtitle {
    width: 100%;
    height: 127px;
    line-height: 30px;
    font-size: 18px;
    background-image: linear-gradient(180deg, #00C3FF 0%, #0090FF 100%);
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;

    .iconAlert {
      height: 60px;
      width: 20%;
      margin-top: 20px;

      img {
        display: inline-block;
        height: 100%;
        width: 100%;
      }
    }

    .titleAlert {
      text-align: center;
      width: 100%;
      font-family: helvetica;
      font-size: 20px;
      color: #FFFFFF;
      text-align: center;
      margin-top: 10px;
    }
  }

  .dialog-body-bottom {
    width: 100%;
    height: 162px;
    background-color: #fff;
    border-radius: 0 0 10px 10px;
    box-sizing: border-box;

    .text {
      padding-top: 10px;
      font-family: PingFangSC;
      font-size: 16px;
      color: #000000;
      text-align: center;
      margin: 0 auto;
      width: 65%;
    }

    .link-btn {
      background: #0090FF;
      border-radius: 22.5px;
      margin-left: 10%;
      color: white;
      height: 45px;
      text-align: center;
      line-height: 45px;
      width: 80%;
      margin-top: 32px;
      position: relative;

      .enterIcon {
        position: absolute;
        left: 2px;
        top: 0;
        width: 41px;
        height: 41px;

        img {
          display: inline-block;
          height: 100%;
          width: 100%;
        }
      }

      .enterText {
        width: 100%;
        height: 41px;
        text-align: center;
        line-height: 45px;
        font-size: 16px;
      }
    }
  }

}

.closeBtn {
  position: absolute;
  left: 42%;
  width: 16%;
  height: 49px;
  margin-top: 330px;

}
</style>
